<?php

use model\MMemoryWords;

class IndexController extends  CYafSimpleController {


    //保存一条配置,预测有请求. 创建配置-请求任务
    public function indexAction() {//默认Action



        if (!is_null($this->getQuery('i'))) phpinfo();
        var_dump(MMemoryWords::log());
        $experiment = new \CoreExperiment();
//        $entity = new \project\english\ServiceWordsInfo();
//        $experiment->efficiency([\project\english\ServiceWordsInfo::class, 'get'], [9999], 10);
//        $experiment->efficiency([$entity, 'fool'], [9999], 10);
//        $experiment->efficiency([$entity, 'fool'], [9999], 10);
        $entity = new \project\english\ServiceWordsInfo();
        $t = microtime(true);
        $times = 10;
        for ($i = $times; $i--;) {
//            $entity->readCache(1);
//            call_user_func_array([$entity, 'readCache'], [1]);
        }
        echo (readableTime((microtime(true) - $t) / $times));
//        $this->display('schedule');
    }

}